#{if _mode == 'display' }
	<table id="clients_table">
		<caption>Liste des clients actuels</caption> <br/>
		<thead>
			<tr>
				<th>Nom</th>
				<th>Adresse</th>
				<th>Pays</th>
				<th>Code Postal</th>
				<th>Ville</th>
				<th>Telephone</th>
				<th>Mail</th>
				<th>CRUD</th>
			</tr>
		</thead>
		<tbody>
			#{list items:_clients, as:'client' }
			<tr>
				<td>${client.getName()}</td>
				<td>${client.getAddress()}</td>
				<td>${client.getCountry()}</td>
				<td>${client.getZip()}</td>
				<td>${client.getCity()}</td>
				<td>${client.getPhone()}</td>
				<td>${client.getEmail()}</td>
				<td>
				<!-- suppression de l'action supprimer car les delete en cascade font bugger l'appli...
					<img src="http://www.bloggingbistro.com/wp-content/uploads/2011/03/Delete-Icon.png" width="20px"  
						onclick="deleteClient(${client.getClientID()}, '${client.getName().escapeJavaScript().escapeHtml()}');"/>
				-->
					<img src="http://cdn1.iconfinder.com/data/icons/icojoy/shadow/standart/png/24x24/001_45.png" width="20px" 
						onclick="showUpdateClientPanel(${client.getClientID()});"/>
						
					
				</td>
			</tr>
			#{/list}
		</tbody>
	</table>
#{/if}


#{if _mode == 'add'}
	#{form @RTU.addClient(), method:'POST', id:'addClientForm', enctype:'multipart/form-data' }
		#{field 'name'}
	      	<label>Nom</label>
	      	<br/>
	        <input type="text" size="50" id="${field.id}" name="${field.name}" />
		#{/field}		
		<br/>
		
		#{field 'address'}
	      	<label>Adresse</label>
	        <input type="text" size="50" id="${field.id}" name="${field.name}" />
		#{/field}
		<br/>
		
		#{field 'country'}
	      	<label>Pays</label>
	        <input type="text" size="50" id="${field.id}" name="${field.name}" />
		#{/field}
		<br/>
		
		#{field 'zip'}
	      	<label>Code postal</label>
	      	<br/>
	        <input type="text" size="10" id="${field.id}" name="${field.name}" />
		#{/field}	
		<br/>
		
		#{field 'city'}
	      	<label>Ville</label>
	      	<br/>
	        <input type="text" size="20" id="${field.id}" name="${field.name}" />
		#{/field}	
		<br/>
		
		#{field 'phone'}
	      	<label>Téléphone</label>
	      	<br/>
	        <input type="text" size="14" id="${field.id}" name="${field.name}" />
		#{/field}	
		<br/>
		
		#{field 'email'}
	      	<label>Email</label>
	      	<br/>	      	
	        <input type="text" size="20" id="${field.id}" name="${field.name}" />
		#{/field}	
		<br/>
		
	#{/form}
	<button id="add_client_button" onclick="javascript:submitClientForm()">Ajouter le client</button>
#{/if}

#{if _mode == 'edit'}
	#{form @RTU.updateClient(), method:'POST', id:'updateClientForm', enctype:'multipart/form-data' }
		<input type="hidden" id="clientID" name="clientID"/>
		#{field 'name'}
	      	<label>Nom</label>
	        <input type="text" size="50" id="${field.id}" name="${field.name}" />
		#{/field}		
		<br/>
		
		#{field 'address'}
	      	<label>Adresse</label>
	        <input type="text" size="50" id="${field.id}" name="${field.name}" />
		#{/field}
		<br/>
		
		#{field 'country'}
	      	<label>Pays</label>
	        <input type="text" size="50" id="${field.id}" name="${field.name}" />
		#{/field}
		<br/>
		
		#{field 'zip'}
	      	<label>Code postal</label>
	        <input type="text" size="10" id="${field.id}" name="${field.name}" />
		#{/field}	
		<br/>
		
		#{field 'city'}
	      	<label>Ville</label>
	        <input type="text" size="20" id="${field.id}" name="${field.name}" />
		#{/field}	
		<br/>
		
		#{field 'phone'}
	      	<label>Téléphone</label>
	        <input type="text" size="14" id="${field.id}" name="${field.name}" />
		#{/field}	
		<br/>
		
		#{field 'email'}
	      	<label>Email</label>
	        <input type="text" size="20" id="${field.id}" name="${field.name}" />
		#{/field}	
		<br/>
		<input type="submit" value="Modifier Client"/>
	#{/form}
#{/if}

